-- card: 4813 from stack: in -- bmap block id: 5968 -- flags: 4000 -- background id: 2143 -- name: Figure Attack ----- HyperTalk script ----- on openCard global YourOff global YourDef global YourHP global OppOff global OppDef global OppHp global MissedAttack global WentHelp if not WentHelp then subtract 2 from YourHP if not MissedAttack then put YourOff into it add 1 to it put line it of card field "Offenses" into it put "You swing with a " & it into card field "YourAttack" put YourDef into it add 1 to it put line it of card field "Defenses" into it put "You set your shield " & it into card field "YourDefense" else put "You forget to attack" into card field "YourAttack" put "You forget to defend" into card field "YourDefense" end if subtract 2 from OppHP put random(6) into OppOff put WhichDefense(OppOff) into OppDef put OppOff into it add 1 to it put line it of card field "Offenses" into it put "Your foe tries a " & it into card field "OppAttack" put OppDef into it add 1 to it put line it of card field "Defenses" into it put "Your foe uses a shield " & it into card field "OppDefense" if not MissedAttack then put TheResult(YourOff,OppDef) into it else put 0 into it end if if it = 1 then put "You hit your foe!" into card field "Your Result" else if it = .5 then put "You glance your foe" into card field "Your Result" else put "You miss" into card field "Your Result" end if end if put Round(it * random(20) * YourHP / 100) into OppDamage if not MissedAttack then put TheResult(OppOff,YourDef) into it else put 1 into it end if if it = 1 then put "Your foe hits you!" into card field "Opp Result" else if it = .5 then put "Your foe glances you" into card field "Opp Result" else put "Your foe misses" into card field "Opp Result" end if end if put Round(it * random(20) * OppHP / 100) into YourDamage subtract YourDamage from YourHP subtract OppDamage from OppHP If YourHP <= 0 then put "You die" into card field "Your Special" else if YourHP <= 20 then put "You feel weak" into card field "Your Special" end if end if If OppHP <= 0 then put "Your foe dies" into card field "Opp Special" else if OppHP <= 20 then put "Your foe seems weak" into card field "Opp Special" end if end if end if put false into WentHelp end openCard function TheResult o,d put o into io add 1 to io put d into id add 1 to id return word id of line io of card field "Results" end TheResult function WhichDefense x if x > 2 then put random(9) into def else if x = 1 then put random(3) into it if it = 1 then put 1 into def else if it = 2 then put 4 into def else put 7 into def end if end if else put random(6) into it if it = 1 then put 1 into def else if it = 2 then put 2 into def else if it = 3 then put 4 into def else if it = 4 then put 5 into def else if it = 5 then put 7 into def else put 8 into def end if end if end if end if end if end if end if return def end WhichDefense -- part 1 (field) -- low flags: 01 -- high flags: 0000 -- rect: left=1 top=89 right=109 bottom=248 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 5 -- text size: 14 -- style flags: 0 -- line height: 18 -- part name: YourAttack -- part 2 (field) -- low flags: 01 -- high flags: 0000 -- rect: left=1 top=109 right=129 bottom=248 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 5 -- text size: 14 -- style flags: 0 -- line height: 18 -- part name: YourDefense -- part 3 (field) -- low flags: 01 -- high flags: 0000 -- rect: left=251 top=89 right=109 bottom=510 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 5 -- text size: 14 -- style flags: 0 -- line height: 18 -- part name: OppAttack -- part 4 (field) -- low flags: 01 -- high flags: 0000 -- rect: left=251 top=109 right=129 bottom=510 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 5 -- text size: 14 -- style flags: 0 -- line height: 18 -- part name: OppDefense -- part 7 (field) -- low flags: 01 -- high flags: 0000 -- rect: left=22 top=198 right=218 bottom=212 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 5 -- text size: 14 -- style flags: 0 -- line height: 18 -- part name: Your Result -- part 8 (field) -- low flags: 01 -- high flags: 0000 -- rect: left=22 top=218 right=256 bottom=212 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 5 -- text size: 14 -- style flags: 0 -- line height: 18 -- part name: Your Special -- part 9 (field) -- low flags: 01 -- high flags: 0000 -- rect: left=276 top=198 right=218 bottom=467 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 5 -- text size: 14 -- style flags: 0 -- line height: 18 -- part name: Opp Result -- part 11 (field) -- low flags: 01 -- high flags: 0000 -- rect: left=276 top=218 right=256 bottom=467 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 5 -- text size: 14 -- style flags: 0 -- line height: 18 -- part name: Opp Special -- part 12 (button) -- low flags: 00 -- high flags: 0000 -- rect: left=82 top=289 right=332 bottom=144 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: ----- HyperTalk script ----- on mouseUp global WentHelp put true into WentHelp push this card visual effect iris open slowly go to card "Sword Play Help Index" end mouseUp -- part 13 (button) -- low flags: 00 -- high flags: 0000 -- rect: left=340 top=289 right=332 bottom=419 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: ----- HyperTalk script ----- on mouseUp global WentHelp put true into WentHelp push this card visual effect iris open slowly go to card "Result Help Start" end mouseUp -- part 15 (button) -- low flags: 00 -- high flags: 0000 -- rect: left=193 top=260 right=309 bottom=301 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: ----- HyperTalk script ----- on mouseUp global YourHP global OppHP put "" into card field "YourAttack" put "" into card field "YourDefense" put "" into card field "Your Result" put "" into card field "Your Special" put "" into card field "OppAttack" put "" into card field "OppDefense" put "" into card field "Opp Result" put "" into card field "Opp Special" If (YourHP <= 0) and (OppHP <= 0) Then go to card "Both Dead" else If YourHP <= 0 Then go to card "Player Dead" else if OppHP <= 0 Then go to card "Win Certificate" else go to card "Off/Def" end if end if end if end mouseUp -- part 16 (button) -- low flags: 00 -- high flags: 0000 -- rect: left=176 top=317 right=341 bottom=312 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: ----- HyperTalk script ----- on mouseUp global YourHP global OppHP put "" into card field "YourAttack" put "" into card field "YourDefense" put "" into card field "Your Result" put "" into card field "Your Special" put "" into card field "OppAttack" put "" into card field "OppDefense" put "" into card field "Opp Result" put "" into card field "Opp Special" If (YourHP <= 0) and (OppHP <= 0) Then go to card "Both Dead" else If YourHP <= 0 Then go to card "Player Dead" else if OppHP <= 0 Then go to card "Win Certificate" else go to card "Player Status" end if end if end if end mouseUp -- part 17 (field) -- low flags: 01 -- high flags: 0000 -- rect: left=49 top=28 right=40 bottom=61 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 3 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Offenses -- part 18 (field) -- low flags: 01 -- high flags: 0000 -- rect: left=66 top=28 right=40 bottom=78 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 3 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Defenses -- part 19 (field) -- low flags: 01 -- high flags: 0000 -- rect: left=83 top=28 right=40 bottom=95 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 3 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Results -- part contents for card part 17 ----- text ----- Cut Right Cut Center Cut Left Sweep High Sweep Mid Sweep Low -- part contents for card part 18 ----- text ----- High Left High Center High Right Mid Left Mid Center Mid Right Low Left Low Center Low Right -- part contents for card part 19 ----- text ----- SHL SHC SHR SML SMC SMR SLL SLC SLR CL .5 0 0 1 .5 0 1 1 .5 CC 0 0 0 .5 0 .5 1 .5 1 CR 0 0 .5 0 .5 1 .5 1 1 SH 0 0 .5 0 .5 1 .5 1 1 SM 0 .5 1 0 0 .5 0 .5 1 SL .5 1 1 0 .5 1 0 0 .5